//
//  UIButton+Extension.swift
//  weibo
//
//  Created by yanghong on 15/12/5.
//  Copyright © 2015年 杨鸿. All rights reserved.
//

import UIKit

extension UIButton {

    convenience init(title: String, fontSize: CGFloat, color: UIColor, imageName: String? = nil) {
    
      self.init()
        
        setTitle(title, forState: UIControlState.Normal)
        titleLabel?.font = UIFont.systemFontOfSize(fontSize)
        setTitleColor(color, forState: UIControlState.Normal)
        if let imageN = imageName {
            imageView?.image = UIImage(named: imageN)
        }
    
    }
}
